import java.util.ArrayList;
import java.util.List;


class Component implements IComponent {
    Component(String name) {
        this.name = name;
    }

    private String name;
    private List<IPoint> child = new ArrayList<>();

    @Override
    public void getInfo() {
        System.out.println("----------------");
        System.out.println(name);
        getChildren().forEach(IPoint::getInfo);
    }

    @Override
    public void addChild(IPoint point) {
        child.add(point);
    }

    @Override
    public List<IPoint> getChildren() {
        return child;
    }
}
